package com.fc.redis.entity;

public enum EPriceType {

    OrderPrice("Order","订单价格"),
    ProductPrice("Product","商品价格");

    private String type;
    private String desc;
    private EPriceType(String type, String desc) {
        this.desc = desc;
        this.type = type;
    }

    public String getType() {
        return type;
    }

    public String getDesc() {
        return desc;
    }

    public static EPriceType of(String type) {
        EPriceType[] values = EPriceType.values();
        for (EPriceType ePriceType: values) {
            String type1 = ePriceType.getType();
            if(type1.equals(type)){
                return ePriceType;
            }
        }
        throw new RuntimeException("未知");
    }

}
